package vns.server.domain;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

import vns.shared.ObjectTypeIntegerDTO;

public class ObjectTypeInteger {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key id;
	
	@Persistent
	private int value;
	
	public ObjectTypeInteger(ObjectTypeIntegerDTO objectTypeIntegerDTO){
		this.value=objectTypeIntegerDTO.getValue();
	}
	
	public void updatefromDTO(ObjectTypeIntegerDTO objectTypeIntegerDTO){
		this.value=objectTypeIntegerDTO.getValue();
	}
	
	public ObjectTypeIntegerDTO toDTO(){
		ObjectTypeIntegerDTO otInteger=new ObjectTypeIntegerDTO(this.id,this.value);
		return otInteger;
	}
	
	public Key getId(){
		return id;
	}
	
	public int getValue(){
		return value;
	}
	
	public void setValue(int Value){
		this.value=Value;
	}
}
